#include <iostream>
#include <vector>

using namespace std;

// 双开区间，找大于等于某值的最早出现
int low_bound(vector<int>& nums, int target){
    int l = -1, r = nums.size();
    while(l + 1 < r){
        int mid = l + (r - l) / 2;
        if(nums[mid] >= target) r = mid;
        else left = mid;
    }
    return right;
}

// 左开右闭，找旋转数组的起点
int findMin(vector<int>& nums){
    int left = -1, right = nums.size() - 1;
    while(left + 1 < right){
        int mid = left + (right - left);
        if(nums[mid] > nums.back()) left = mid;
        else right = mid;
    }
    return right;
}

int main(){
    vector<int> nums = {5,7,7,8,8,10};
    int target;
    int st = low_bound(nums, target);
    if(st == nums.size() || nums[st] > target)
        cout << 
}